package com.yequan;

import java.math.BigDecimal;

public class DoubleDemo {

    public static void main(String[] args) {
        int km = 20000000 / 1000;
        double mileageToCarbon = 0.19712;
        double lessCarbon = BigDecimal.valueOf(km * mileageToCarbon).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue();
//        PushUtil.pushUserMedalText(baseMedalLevel, userId, String.valueOf(km), String.valueOf(lessCarbon));
        System.out.println("lessCarbon: "+lessCarbon);
        System.out.println("StringValueOf: "+String.valueOf(lessCarbon));



    }

}
